package com.crm.crm.service.impl;

import com.crm.crm.mapper.CrmPartnerTypeMapper;
import com.crm.crm.service.CrmPartnerTypeService;
import com.crm.entity.PartnerType;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CrmPartnerTypeServiceImpl implements CrmPartnerTypeService {
    @Autowired
    private CrmPartnerTypeMapper crmPartnerTypeMapper;
    @Override
    public int Insert(PartnerType partnerType) {
        return crmPartnerTypeMapper.Insert(partnerType);
    }

    @Override
    public int Delete(String PartnerType) {
        return crmPartnerTypeMapper.Delete(PartnerType);
    }

    @Override
    public PageInfo<PartnerType> list(int pageIndex, int pageSize) {
        PageHelper.startPage(pageIndex,pageSize);
        return new PageInfo<>(crmPartnerTypeMapper.list());
    }
}
